package main

import (
	"context"
	"google.golang.org/grpc"
	"log"
	"week4/api/user"
)

func main() {
	conn, err := grpc.Dial(":8080", grpc.WithInsecure())
	if err != nil {
		log.Fatalf("did not connect: %v", err)
	}
	defer conn.Close()
	c := user.NewUserClient(conn)

	r, err := c.UserMy(context.Background(), &user.UserRequest{UserID: "123465"})
	if err != nil {
		log.Fatalf("could not greet: %v", err)
	}
	log.Printf("####### get server UserMy response: %s", r)
}
